import java.util.Scanner;

public class Hemowork1 {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		double score;
		double avg = 0;
		double sum = 0;
		double max = 0;
		double min = 0;
		for (int i = 1; i <= 3; i++) {
			System.out.println("第" + i + "个班成绩：");
			sum = 0;
			max = min = 0;
			for (int j = 1; j <= 5; j++) {
				System.out.println("输入第" + j + "个学生成绩：");
				if (!input.hasNextDouble()) {
					System.out.println("成绩输入有误");
					return;
				}
				score = input.nextDouble();
				if (score < 0 || score > 100) {
					System.out.println("成绩超过范围");
					return;
				} else {
					if (max == 0 || min == 0) {
						max = min = score;
					}
					if (score > max) {
						max = score;
					}
					if (score < min) {
						min = score;
					}
				}
				sum += score;
			}

			avg = sum / 5;
			System.out.println("总分：" + sum);
			System.out.println("平均分：" + avg);
			System.out.println("最高分：" + max);
			System.out.println("最低分：" + min);

		}
	}
}
